import request from '@/utils/request'

// 获取会员等级列表（分页）
export function vipLevelList(data) {
  return request({
    url: '/api/vip/vipLevel/getList',
    method: 'post',
    data
  })
}

// 获取会员等级详情
export function vipLevelInfo(id) {
  return request({
    url: `/api/vip/vipLevel/${id}`,
    method: 'get'
  })
}

// 新增会员等级
export function addVipLevel(data) {
  return request({
    url: `/api/vip/vipLevel`,
    method: 'POST',
    data
  })
}

// 编辑会员等级
export function editVipLevel(id, data) {
  return request({
    url: `/api/vip/vipLevel/${id}`,
    method: 'PUT',
    data
  })
}

// 获取会员等级列表数据字典
export function getVipGrade(id) {
  return request({
    url: `/api/system/DictionaryData/${id}`,
    method: 'GET',
    data: {
      keyword: '',
      isTree: 0
    }
  })
}

